import request from '@/utils/request'

/*
	获取用户列表
	pageNum, pageSize 分页
*/
export function fetchUserListAjax(data) {
  return request({
    url: '/admin/rddUsers',
    method: 'get',
    params: { ...data }
  })
}

export function distributeShop(data) {
  return request({
    url: '/admin/userStatus/1Store',
    method: 'put',
    data: data
  })
}

export function distributeShopConfirm(data) {
  return request({
    url: '/admin/userStatus/3Worker',
    method: 'put',
    data: data
  })
}

export function distributeFactory(data) {
  return request({
    url: '/admin/userStatus/2Company',
    method: 'put',
    data: data
  })
}

export function rddUserSettlementDetail(data) {
  return request({
    url: '/admin/rddUserSettlement/' + data,
    method: 'get',
    data: data
  })
}

export function rddUserSettlementInput(data) {
  var url = '';
  if(data.user_status_id) {
    url = '/admin/rddUserSettlement/' + data.user_status_id;
  } else {
    url = '/admin/rddUserSettlement';
  }
  return request({
    url: url,
    method: 'put',
    data: data
  })
}

